﻿namespace Dcms.UpdateModule
{
    using Dcms.BaseClass;
    using Dcms.Common;
    using System;
    using System.Data;
    using System.Web.UI;

    public class DcmsTempResolve : DcmsTempBaseResolve
    {
        public override string FormatDataTime(string DataTimeStr, string StyleStr)
        {
            return Utils.FormatDataTime(DataTimeStr, StyleStr);
        }

        public override string FormatSpecialFile(string ModelName, string HtmlTmep, DataRow Datadr)
        {
            HtmlTmep = DcmsAllModelSqlManage.CommSpecialFieldResolve(ModelName, HtmlTmep, Datadr);
            return HtmlTmep;
        }

        public override string FormatStrLength(string Str, string LenghtStr)
        {
            Str = Utils.ClearHtml(Str);
            return Utils.cutString(Str, Utils.StrToInt(LenghtStr, 10));
        }

        public override string FormatStrProcess(string CurrIndex, int Step)
        {
            return Utils.FormatStrProcess(CurrIndex, Step);
        }

        public override string GetHtmlTempStr(string Htmlstr, ControlCollection Controls)
        {
            Dcms.UpdateModule.DcmsOperateModel model = new Dcms.UpdateModule.DcmsOperateModel();
            return model.GetControlCondition(Htmlstr, Controls);
        }

        public override DataTable GetSqlDataTabel(string SqlStr)
        {
            DataTable table = new DataTable();
            return DcmsAllModelSqlManage.GetSqlStrDataTabel(SqlStr);
        }
    }
}

